{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">

<body class="nav-md">

<div class="container body">

  <div class="main_container">

    {include file="public_sidebar,public_nav" /}
    <!-- page content -->
    <div class="right_col" role="main">
      <div class="">

        <div class="page-title">
          <div class="title_left">
            <h3>退款退货订单管理</h3>
          </div>
        </div>
        <div class="clearfix"></div>
        <div class="row">
          <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
              <div class="x_title">
                <h2>{$mate_title}</h2>
                <ul class="nav navbar-right panel_toolbox">
                  <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                  </li>
                  <li><a class="close-link"><i class="fa fa-close"></i></a>
                  </li>
                </ul>
                <div class="clearfix"></div>
              </div>
              <div class="x_content">
                <br/>
                <form class="form-horizontal form-label-left" enctype="multipart/form-data" action=""
                      method="post" id="registerForm">

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订 单 号：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      <div>{$item.shop_order_number}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                    </div>
                  </div>
                  <input type="hidden" name="refund_id" value="{$refund_find['id']}">
                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">店铺名称：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.title}
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">买家账号：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.buyers}
                    </div>
                  </div>
                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">下单时间：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.create_time|date='Y-m-d H:i:s',###}
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">买家留言：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.message|default=''}
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">抵用优惠券金额：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.coupon_price|default='0'} 元
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">抵用红包金额：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.red_packet_price|default='0'} 元
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">运费金额：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.freight|default='0'} 元
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">收货地址详情：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      姓　　名：{$item.address_name}<br>
                      手 机 号 ：{$item.address_phone}<br>
                      地　　区：{$item.address_area}<br>
                      详细地址：{$item.address_site}<br>
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">支付方式：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {$item.way}
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单总额：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">

                      <input type="text" placeholder="订单总额"
                             class="form-control col-md-7 col-xs-12" name="order_price"
                             value="{$item.price|default='0'}"
                             style="width: 100px;text-align: center"
                             {gt name="item.price" value="0"}disabled{/gt}
                      >
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">订单状态：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      {switch name="$item.status"}
                      {case value="6"}申请退款{/case}
                      {case value="7"}申请退货{/case}
                      {case value="9"}退货中，卖家验货{/case}
                      {case value="10"}退货/退款成功{/case}
                      {case value="11"}退货/退货失败{/case}
                      {/switch}
                    </div>

                  </div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">包含商品：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      <table width="80%" border="1" style="font-family: '微软雅黑';">
                        <tr align="center" style="font-size: 16px;">
                          <td>商品ID</td>
                          <td>商品图片</td>
                          <td>商品名称</td>
                          <td>商品规格</td>
                          <td>商品价格</td>
                          <td>购买数量</td>
                        </tr>
                        {volist name='goods_list' id='goods_list'}
                        <tr align="center">
                          <td>{$goods_list.goods_id|default=''}</td>
                          <td style="padding: 20px;"><img id="imgShow" src="__PUBLIC__/{$goods_list.thumb_img|default=''}"
                                                          width="100" height="100"
                                                          onerror="this.src='__STATIC__/images/default.png'"/></td>
                          <td>{$goods_list.title|default=''}</td>
                          <td>{$goods_list.attr|default='无'}</td>
                          <td>{$goods_list.price|default=''}</td>
                          <td>{$goods_list.number|default=''}</td>
                        </tr>
                        {/volist}
                      </table>
                    </div>

                  </div>

                  {in name="$item.status" value="6,7,9,10,11"}

                  <div class="divider-dashed"></div>

                  <div class="form-group">

                    <label class="control-label col-md-3 col-sm-3 col-xs-12">退款说明：</label>
                    <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                      <table width="150%" border="1" style="font-family: '微软雅黑';">
                        <tr align="center" style="font-size: 16px;">
                          <td>退款组图</td>
                          <td>退款原因</td>
                          <td>退款金额</td>
                          <td>退款说明</td>
                          <td>退款类型</td>
                          <td>运 单 号</td>
                          <td>申请时间</td>
                        </tr>
                        <tr align="center">
                          <td style="padding: 20px;">
                            {empty name='$refund_find.picArr'}

                            暂无图片

                            {else/}

                            {foreach name=":unserialize($refund_find['picArr'])" item="value"}
                            <img src="__PUBLIC__/{$value['path']}"
                                 width="50" height="50"
                                 onerror="this.src='__STATIC__/images/default.png'"/>
                            {/foreach}

                            {/empty}
                          </td>
                          <td>{$refund_find.cause|default=''}</td>
                          <td>{$refund_find.amount|default='无'}</td>
                          <td>{$refund_find.explain|default=''}</td>
                          <td>{$refund_find.type_text|default=''}</td>
                          <td>{$refund_find.tracking_number|default=''}</td>
                          <td>{$refund_find.create_time|date='Y-m-d H:i:s',###}</td>
                        </tr>
                      </table>
                    </div>

                  </div>

                  <div class="divider-dashed"></div>

                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">退款状态：</label>

                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">

                      <select name="order_status" class="form-control" style="width: 200px;float: left;" tabindex="-1" {in name='item.status' value='10,11'}disabled{/in}>

                      {if condition="$refund_find['type'] eq 1" }

                      <option value="10" {eq name='item.status' value='10'}selected{/eq}>申请退款成功</option>

                      <option value="11" {eq name='item.status' value='11'}selected{/eq}>申请退款失败</option>
                      {else/}
                      {eq name="$item.status" value="7"}
                      <option value="9" {eq name='item.status' value='9'}selected{/eq}>退货申请通过</option>

                      <option value="11" {eq name='item.status' value='11'}selected{/eq}>退货申请驳回</option>
                      {else/}
                      <option value="10" {eq name='item.status' value='10'}selected{/eq}>退货成功</option>

                      <option value="11" {eq name='item.status' value='11'}selected{/eq}>退货失败</option>
                      {/eq}
                      {/if}

                      </select>
                    </div>
                  </div>

                  <div class="divider-dashed"></div>

                  {in name="$item.status" value="6,7,9,10"}
                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">实际退款金额：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">

                      <input type="text" placeholder="订单总额" class="form-control col-md-7 col-xs-12" name="price"  value="{$refund_find.price|default='0'}" style="width: 100px;text-align: center" >
                      <input type="hidden" name="refund_type" value="{$refund_find.type}">
                    </div>
                  </div>
                  <div class="divider-dashed"></div>
                  {/in}


                  <div class="form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">未退款理由：</label>
                    <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                                <textarea type="text" placeholder="未退款理由,不填写留空" style="width: 500px;height: 100px;"
                                                          class="form-control col-md-7 col-xs-12" name="message">{$refund_find.message|default=''}</textarea>
                      <div style="width:500px;clear: both">
                        <span style="font-size: 16px;color: red">注：只有在退款状态是退款失败的时候填写</span>
                      </div>
                    </div>
                  </div>

                  {/in}

                  <div class="ln_solid"></div>

                  <div class="form-group">
                    {present name="$item.id"}
                    <input type="hidden" name="id" value="{$refund_find.id}">
                    <input type="hidden" name="member_id" value="{$item.member_id}">
                    <input type="hidden" name="order_number" value="{$item.shop_order_number}">
                    <input type="hidden" name="refund_type" value="{$refund_find.type}">
                    {/present}
                    <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">

                      <button type="submit" class="btn btn-primary">提交</button>
                      <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                    </div>
                  </div>

                </form>
              </div>
            </div>
          </div>
        </div>


      </div>
      <!-- /page content -->

    </div>

  </div>
</div>

{include file="public_foot" /}
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>

  // validform
  $(function () {

    $.Tipmsg.r = null;

    var showmsg = function (msg) {
      //假定你的店铺商品提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
      alert(msg);
    }

    // select2
    $(".select2_single").select2({
      placeholder: "请选择快递公司",
      allowClear: true
    });

    $(".select2_single2").select2({
      placeholder: "请选择订单状态",
      allowClear: true
    });

    $("#registerForm").Validform({
      tiptype: function (msg) {
        layer.msg(msg);
      },
      tipSweep: true
    });
  })
</script>
</body>

</html>
